﻿function CONTENT_URL(_name) {
    return '' + _name + (_name.indexOf("?") == -1 ? "?" : "&") + "_=" + window.getPageVersion();
}

function SCRIPT_URL(_name) {
    return 'Scripts/' + _name + "?_=" + window.getPageVersion();
}

function WriteLink(path) {
    document.writeln('<link rel="stylesheet" type="text/css" href="' + window.CDNSite + path + "?_=" + window.getPageVersion() + '" />');
}

function WriteScript(path) {
    document.writeln('<script src="' + window.CDNSite + path + "?_=" + window.getPageVersion() + '"></script>');
}


WriteLink("Scripts/BootStrap/css/bootstrap.css");
WriteLink("Scripts/BootStrap/css/bootstrap-theme.css");
WriteLink("Scripts/AngularJS-l/angular-l.css");
WriteLink("Scripts/AngularJS-l/angular-l-leaflet.css");
WriteLink("Scripts/Animate/animate.css");
WriteLink("Content/site.css");
WriteLink("Content/layout.css");
WriteLink("Content/logon.css");
WriteLink("Content/CommonCss/SiteCommon.css");
WriteLink("Scripts/WeUI/weui.css");

//if (window.INIT_TYPE == "cms") {
//    WriteScript("Scripts/AngularCN/angular.js");
//    WriteScript("Scripts/AngularJS-l/angular-l.js");
//
//    WriteScript("Scripts/jquery.js");
//    WriteLink("Scripts/umeditor/themes/default/css/umeditor.css");
//    WriteScript("Scripts/umeditor/umeditor.config.js");
//    WriteScript("Scripts/umeditor/umeditor.js");
//    WriteScript("Scripts/umeditor/lang/zh-cn/zh-cn.js");
//} else {
    WriteScript("Scripts/AngularCN/angular.js");
    WriteScript("Scripts/WeUI/angular-wx.js");
    WriteScript("Scripts/AngularJS-l/angular-l-leaflet.js");
    WriteLink("Scripts/Leaflet/leaflet.css");
    WriteLink("Scripts/Leaflet/leaflet.css");
    WriteScript("Scripts/Leaflet/leaflet.js");
    WriteScript("Scripts/Leaflet/Plugin/leaflet-heat.js");
    WriteScript("Scripts/Leaflet/angular-leaflet-directive.js");
//}

var GlobalConfig = {
    APIServer: window.APIServer
};

var Lv_Global = {
    Img: {
        empty: window.CDNSite + 'Resource/default.jpg',
        error: window.CDNSite + 'Resource/default_error.jpg'
    }
}